package com.ydgk.jishuzhan.dao;

import com.ydgk.jishuzhan.beans.Message;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface MessageMapper {
    List<Message> getMessages(Map<String, Object> map);

    Integer queryMessageTotal(Map<String, Object> map);

    @Select("select * from message where id = #{id}")
    Message findMessage(Integer id);

    @Update("update message set ifRead = 1 where id = #{id}")
    void setRead(Integer id);

    void batchDelete(Integer[] ids);

    @Delete("delete from message where id =#{id}")
    void deleteById(Integer id);
}
